/// <reference path="Error.ts" />
/// <reference path="Enumerations\AsyncResultStatus.ts" />

declare module Microsoft.Office.WebExtension {

    /** An object which encapsulates the result of an asynchronous request, including status and error information if the request failed. */
    export class AsyncResult {

        /** Gets the user-defined item passed to the optional asyncContext parameter of the invoked method in the same state as it was passed in. */
        asyncContext: any;
        /** Gets an Error object that provides a description of the error, if any error occurred. */
        error: Microsoft.Office.WebExtension.Error;
        /** Gets the status of the asynchronous operation. */
        status: Microsoft.Office.WebExtension.AsyncResultStatus;
        /** Gets the payload or content of this asynchronous operation, if any. */
        value: any;
    }

}